using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class BND_HeaderMap : EntityTypeConfiguration<BND_Header>
    {
        public BND_HeaderMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.RecordType)
                .HasMaxLength(30);

            this.Property(t => t.BannerProcedure)
                .HasMaxLength(50);

            this.Property(t => t.CAPTION)
                .HasMaxLength(100);

            this.Property(t => t.List)
                .HasMaxLength(250);

            this.Property(t => t.BND_SecCode)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("BND_Header");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.RecordType).HasColumnName("RecordType");
            this.Property(t => t.BannerProcedure).HasColumnName("BannerProcedure");
            this.Property(t => t.Height).HasColumnName("Height");
            this.Property(t => t.Width).HasColumnName("Width");
            this.Property(t => t.Maximized).HasColumnName("Maximized");
            this.Property(t => t.ShowCounts).HasColumnName("ShowCounts");
            this.Property(t => t.ShowCommandCaption).HasColumnName("ShowCommandCaption");
            this.Property(t => t.CAPTION).HasColumnName("CAPTION");
            this.Property(t => t.LeftBarWidth).HasColumnName("LeftBarWidth");
            this.Property(t => t.List).HasColumnName("List");
            this.Property(t => t.BND_SecCode).HasColumnName("BND_SecCode");
        }
    }
}
